home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / FORTRAN / 3017.ZIP / OSLIB1.TXT < prev    next >
Text File  |  1989-03-26  |  22KB  |  727 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.      
  7.      
  8.      
  9.      
  10.                                       D-ACCESS
  11.                                    (Version 1.0)
  12.      
  13.      
  14.                   Library of Interface Modules Between FORTRAN 77
  15.                           And DOS, BIOS, I/O and Hardware
  16.                       For the IBM PC/XT/AT/PS2 and Compatibles
  17.      
  18.               Developed for Microsoft MSFOR and Ryan-McFarland PROFORT
  19.      
  20.                                          by
  21.      
  22.                                   OLYMPIC SOFTWARE
  23.                  P.O. BOX 769, Bryn Mawr, PA   19010, 215-353-6971
  24.      
  25.      
  26.      
  27.      
  28.      
  29.      
  30.      
  31.      
  32.      
  33.      
  34.      
  35.      
  36.      
  37.      
  38.      
  39.      
  40.      
  41.      
  42.      
  43.      
  44.      
  45.      
  46.      
  47.      
  48.      
  49.      
  50.      
  51.      
  52.                                 (C)  Copyright 1988
  53.                                   OLYMPIC SOFTWARE
  54.                                 ALL RIGHTS RESERVED
  55.      
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.      
  73.                                     REGISTRATION
  74.      
  75.           If you are not a registered user of D-ACCESS, please register now by
  76.      sending $25.00 to our address.  Registration brings the following
  77.      benefits:
  78.      
  79.           1.  Most importantly, you will help continue the further development
  80.      of this product.
  81.           2.  You will be notified of all changes, updates, tips, etc.
  82.      
  83.      
  84.                                     TRADEMARKS:
  85.      
  86.           International Business Machines:   IBM PC, XT, AT, PS/2,
  87.                                              Proprinter
  88.           Microsoft Corporation:             Windows
  89.           Epson America, Inc:                Epson FX
  90.           C.Itoh Digital Products, Inc:      C.Itoh
  91.           Okidata Corporation:               Okidata
  92.      
  93.              D-ACCESS Version 1.0, (C) Copyright 1988, Olympic Software
  94.                  P.O. Box 769, Bryn Mawr, PA   19010, 215-353-6971
  95.      
  96.      
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.                                   I.  INTRODUCTION
  139.      
  140.           D-ACCESS, provides access to all the functions available in the IBM
  141.      DOS and BIOS, access to the I/O ports including the mouse and direct
  142.      memory operations, all from FORTRAN.  The possibilities presented to the
  143.      IBM PC FORTRAN programmer by D-ACCESS are limitless.  He is no longer
  144.      restricted to the functions provided by the FORTRAN compiler.  He has the
  145.      freedom to use as high level or as low level a function as he sees
  146.      appropriate.  It is good programming practice, however, to use the highest
  147.      level function available.  First choice is the FORTRAN compiler, second is
  148.      DOS, third is BIOS and then come direct I/O and memory operations.  For
  149.      portability, it makes sense to avoid direct access of I/O and memory. 
  150.      BIOS can help you do that in most cases, by providing a nice set of
  151.      functions.
  152.      
  153.           D-ACCESS is a set of interface modules which you can call from within
  154.      FORTRAN with the appropriate parameters.  In most cases these parameters
  155.      are 8086/80286 register values.  The modules in turn call DOS, BIOS or the
  156.      mouse driver, or perform direct I/O or memory operations.  Applications
  157.      where D-Access will be extremely valuable include Graphics Programs
  158.      (typically using BIOS), Data Base Programs (typically using DOS), Sound
  159.      Programs (typically using I/O operations), Mouse Based User Interface
  160.      Programs (typically using the mouse module), Communication Programs
  161.      (typically using BIOS), Printer oriented utilities (typically using BIOS),
  162.      etc.  The possibilities are endless.  Our Olympic Software DPLOT, for
  163.      example, makes an extensive use of BIOS.
  164.      
  165.           Effective use of DOS, BIOS, I/O, mouse or direct memory in a FORTRAN
  166.      program (or any type of program) requires, however, some knowledge of the
  167.      8086 family of CPUs, the IBM PC microcomputer family architectures, PC-DOS
  168.      (or MS-DOS), BIOS and the mouse driver MOUSE.SYS.  The books referenced in
  169.      section III have been found to be excellent for the library of the serious
  170.      programmer.  They are available in most general bookstores, computer
  171.      specialty stores, or University bookstores.
  172.      
  173.           D-ACCESS consists of 24 interface modules in 6 groups:
  174.                1.  FORTRAN-DOS Interface Modules
  175.                2.  FORTRAN-BIOS Interface Modules
  176.                3.  FORTRAN-I/O Interface Modules
  177.                4.  FORTRAN-MOUSE Interface Module
  178.                5.  FORTRAN-Memory Interface Modules
  179.                6.  Miscellaneous Modules
  180.      
  181.      This document is organized in four parts.  Part I is the introduction,
  182.      Part II is a description of the contents on this disk, Part III is a
  183.      detailed description of the interface modules, and Part IV is the
  184.      reference section.
  185.      
  186.           If you have a copy of D-ACCESS library and you are not registered,
  187.      please register now, by sending $25.00 to our address, with your name and
  188.      address.  Being registered brings benefits:  a) You become notified of
  189.      changes, updates, tips, etc.  b) You can participate with your ideas for
  190.      exciting future upgrades, applications, etc.
  191.      
  192.      
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.           Finally, we would like to note that your opinions count; we urge you
  205.      to write to us with any concerns, problems, suggestions for the next
  206.      update, etc.
  207.      
  208.                                  II.  DISK CONTENTS
  209.      
  210.           The files included on the D-ACCESS disk are as follows:
  211.      
  212.           1.  OSLIB1M.LIB:  A library containing the 24 interface modules used
  213.      by MSFOR (Microsoft) FORTRAN programs.
  214.           2.  OSLIB1P.LIB:  A library containing the 24 interface modules used
  215.      by PROFORT (Ryan-McFarland) FORTRAN programs.
  216.           3.  OSLIB1.TXT:  This document
  217.           4.  Source code for a number of FORTRAN programs, provided as
  218.      examples referenced by section III:  TGDOS.FOR, TUDOS.FOR, TIMDAT.FOR,
  219.      TVBIOS.FOR, LINES.FOR, RDKEY.FOR, PRMESS.FOR, SDMESS.FOR, STIMER.FOR,
  220.      RFAT.FOR, TMBIOS.FOR, SOUND.FOR, TMOUSE.FOR, RMOUSE.FOR, PEKPOK.FOR,
  221.      VPP.FOR, TSLOG.FOR, TRAN.FOR, TRANDU.FOR.
  222.           5.  Executable code for LINES.FOR, RDKEY.FOR, SOUND.FOR, RMOUSE.FOR,
  223.      VPP.FOR for a quick check of the D-ACCESS versatility.
  224.      
  225.           Assuming that your FORTRAN subdirectory name is MSFOR and D-ACCESS
  226.      programs are at subdirectory ACCESS, here is an example Link command for
  227.      your program MYPROG:
  228.      
  229.           LINK MYPROG,,NUL,\MSFOR\+\ACCESS\OSLIB1M.LIB
  230.      
  231.                               III.  MODULE DESCRIPTION
  232.      
  233.           The information provided in this Part for each module consists of a)
  234.      module name, b) module function, c) interrupt number which is used
  235.      internally by each module (if applicable), d) calling statement from
  236.      FORTRAN, e) description of parameters, and f) reference to an example
  237.      program.  In most cases, the parameters are register values which are
  238.      discussed in detail in the books referenced in section IV.
  239.      
  240.      1.  FORTRAN-DOS INTERFACE MODULES
  241.      
  242.           A.   GDOSIF
  243.      
  244.                Module function:  General access to all DOS functions
  245.      
  246.                Interrupt numbers:  32 (Program Terminate), 33 (DOS Universal
  247.      Functions), 34 (Terminate Address), 35 (Break Address), 36 (Critical-Error
  248.      Handler Address), 37 (Absolute Disk Read), 38 (Absolute Disk Write), 39
  249.      (Terminate-But-Stay-Resident), 47 (Print Spool Control).
  250.      
  251.                Calling statement:  CALL GDOSIF(IARRAY)
  252.      
  253.                Description of parameters:  IARRAY is an integer array of size
  254.      15, type INTEGER*2 and defined as:  IRQ, IAH, IAL, IBH, IBL, ICH, ICL,
  255.      IDH, IDL, IDS, IES, ISI, IDI, IZF, ICF.  IRQ is the desired interrupt
  256.      number.  IAH, IAL, IBH, IBL, ICH, ICL, IDH, IDL, IDS, IES, ISI, IDI
  257.      contain the contents of the 8086/80286 registers AH, AL, BH, BL, CH, CL,
  258.      DH, DL, DS, ES, SI and DI.  IZF, ICF contain contents of the Zero and
  259.      Carry flags.  Note that IARRAY is defined as INTEGER*2, and so it covers
  260.      the individual registers which are equal to or less than 16 bits wide.
  261.      
  262.                Example programs:  TGDOS.FOR
  263.      
  264.      
  265.  
  266.  
  267.  
  268.  
  269.  
  270.      
  271.           B.   UDOSIF
  272.      
  273.                Module function:  Access to the Universal DOS functions.
  274.      
  275.                Interrupt number:  33
  276.      
  277.                Calling statement:  CALL UDOSIF(IARRAY)
  278.      
  279.                Description of parameters:  IARRAY is an integer array of size
  280.      14, type INTEGER*2 and defined as:  IAH, IAL, IBH, IBL, ICH, ICL, IDH,
  281.      IDL, IDS, IES, ISI, IDI, IZF, ICF.  IAH, IAL, IBH, IBL, ICH, ICL, IDH,
  282.      IDL, IDS, IES, ISI, IDI contain the contents of the 8086/80286 registers
  283.      AH, AL, BH, BL, CH, CL, DH, DL, DS, ES, SI and DI.  IZF, ICF contain
  284.      contents of the Zero and Carry flags.  Note that IARRAY is defined as
  285.      INTEGER*2, and so it covers the individual registers which are equal to or
  286.      less than 16 bits wide.
  287.      
  288.                Example program:  TUDOS.FOR
  289.      
  290.      
  291.           C.   LDOSIF
  292.      
  293.                Module function:  Limited access to the Universal DOS Functions
  294.      
  295.                Interrupt number:  33
  296.      
  297.                Calling statement:  CALL LDOSIF(IARRAY)
  298.      
  299.                Description of parameters:  IARRAY is an integer array of size
  300.      8, type INTEGER*2 and defined as:  IAH, IAL, IBH, IBL, ICH, ICL, IDH,
  301.      IDL.  These parameters contain the contents of the 8086/80286 registers
  302.      AH, AL, BH, BL, CH, CL, DH and DL.  Note that IARRAY is defined as
  303.      INTEGER*2, and so it covers the individual registers which are equal to 8
  304.      bits wide.
  305.      
  306.                Example program:  TIMDAT.FOR
  307.      
  308.      
  309.      2.  FORTRAN-BIOS INTERFACE MODULES
  310.      
  311.           A.   VBIOS
  312.      
  313.                Module function:  General access to BIOS Video Services
  314.      
  315.                Interrupt number:  16
  316.      
  317.                Calling statement:  CALL VBIOS(IARRAY)
  318.      
  319.                Description of parameters:  IARRAY is an integer array of size
  320.      10, type INTEGER*2 and defined as:  IAH, IAL, IBH, IBL, ICH, ICL, IDH,
  321.      IDL, IES, IBP.  These parameters contain the contents of the 8086/80286
  322.      registers AH, AL, BH, BL, CH, CL, DH, DL, ES and BP.  Note that IARRAY is
  323.      defined as INTEGER*2, and so it covers the individual registers which are
  324.      equal to or less than 16 bits wide.
  325.      
  326.                Example program:  TVBIOS.FOR
  327.      
  328.      
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.      
  337.           B.   GBIOS
  338.      
  339.                Module function:  Limited access to BIOS Video Services,
  340.      optimized for fast writing/reading pixels
  341.      
  342.                Interrupt number:  16
  343.      
  344.                Calling statement:  CALL GBIOS(IARRAY)
  345.      
  346.                Description of parameters:  IARRAY is an integer array of size
  347.      4, type INTEGER*2 and defined as:  IAH, IAL, ICX, IDX.  These parameters
  348.      contain the contents of the 8086/80286 registers AH, AL, CX and DX.  Note
  349.      that IARRAY is defined as INTEGER*2, and so it covers the individual
  350.      registers which are equal to or less than 16 bits wide.
  351.      
  352.                Example program:  LINES.FOR
  353.      
  354.      
  355.           C.   KBIOS
  356.      
  357.                Module function:  General Access to BIOS Keyboard Services
  358.      
  359.                Interrupt number:  22
  360.      
  361.                Calling statement:  CALL KBIOS(IARRAY)
  362.      
  363.                Description of parameters:  IARRAY is an integer array of size
  364.      3, type INTEGER*2 and defined as:  IAH, IAL, IZF.  IAH, IAL contain the
  365.      contents of the 8086/80286 registers AH, AL, and IZF contains the contents
  366.      of the Zero flag.  Note that IARRAY is defined as INTEGER*2, and so it
  367.      covers the individual registers which are equal to or less than 8 bits
  368.      wide.
  369.      
  370.                Example program: RDKEY.FOR
  371.      
  372.      
  373.           D.   PBIOS
  374.      
  375.                Module function:  General Access to BIOS Printer Services
  376.      
  377.                Interrupt number:  23
  378.      
  379.                Calling statement:  CALL PBIOS(IARRAY)
  380.      
  381.                Description of parameters:  IARRAY is an integer array of size
  382.      3, type INTEGER*2 and defined as:  IAH, IAL, IDX.  These parameters
  383.      contain the contents of the 8086/80286 registers AH, AL and DX.  Note that
  384.      IARRAY is defined as INTEGER*2, and so it covers the individual registers
  385.      which are equal to or less than 16 bits wide.
  386.      
  387.                Example program:  PRMESS
  388.      
  389.      
  390.      
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.           E.   SBIOS
  403.      
  404.                Module function:  General Access to BIOS Serial Port Services
  405.      
  406.                Interrupt number:  20
  407.      
  408.                Calling statement:  CALL SBIOS(IARRAY)
  409.      
  410.                Description of parameters:  IARRAY is an integer array of size
  411.      3, type INTEGER*2 and defined as:  IAH, IAL, IDX.  These parameters
  412.      contain the contents of the 8086/80286 registers AH, AL and DX.  Note that
  413.      IARRAY is defined as INTEGER*2, and so it covers the individual registers
  414.      which are equal to or less than 16 bits.
  415.      
  416.                Example program:  SDMESS
  417.      
  418.      
  419.           F.   TBIOS
  420.      
  421.                Module function:  General Access to BIOS Time Services
  422.      
  423.                Interrupt number:  26
  424.      
  425.                Calling statement:  CALL TBIOS(IARRAY)
  426.      
  427.                Description of parameters: IARRAY is an integer array of size 6,
  428.      type INTEGER*2 and defined as:  IAH, IAL, ICH, ICL, IDH, IDL.  These
  429.      parameters contain the contents of the 8086/80286 registers AH, AL, CH,
  430.      CL, DH and DL.  Note that IARRAY is defined as INTEGER*2, and so it covers
  431.      the individual registers which are equal to 8 bits wide.
  432.      
  433.                Example program:  STIMER.FOR
  434.      
  435.      
  436.           G.   DBIOS
  437.      
  438.                Module function:  General Access to BIOS Diskette Services
  439.      
  440.                Interrupt number:  19
  441.      
  442.                Calling statement:  CALL DBIOS(IARRAY,IES,IBX)
  443.      
  444.                Description of parameters:  IARRAY is an integer array of size
  445.      7, type INTEGER*2 and defined as:  IAH, IAL, ICH, ICL, IDH, IDL, ICF. 
  446.      IAH, IAL, ICH, ICL, IDH, IDL contain the contents of the 8086/80286
  447.      registers AH, AL, CH, CL, DH and DL.  ICF contains the contents of the
  448.      Carry flag.  Note that IARRAY is defined as INTEGER*2, and so it covers
  449.      the individual registers which are equal to or less than 8 bits wide. 
  450.      IES, IBX are INTEGER*2 and their values are loaded to registers ES, BX in
  451.      the interface module.
  452.      
  453.                Example program:  RFAT.FOR
  454.      
  455.      
  456.      
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.           H.   MBIOS
  469.      
  470.                Module function:  Access to BIOS Print Screen, Equipment List,
  471.      Memory Service, Cassette Tape/Joystick, Switch to BASIC and Reboot
  472.      Services.   WARNING:  Although the module does what it is supposed to do,
  473.      some things may not be possible to do from within FORTRAN (ie. return to
  474.      BASIC).
  475.      
  476.                Interrupt numbers:  5, 17, 18, 21, 24, 25
  477.      
  478.                Calling statement:  CALL MBIOS(IARRAY)
  479.      
  480.                Description of parameters:  IARRAY is an integer array of size
  481.      15, type INTEGER*2 and defined as:  IRQ, IAH,  IAL, IBH, IBL, ICH, ICL,
  482.      IDH, IDL, IDS, IES, ISI, IDI, IZF, ICF.  IRQ is the interrupt number. 
  483.      IAH, IAL, IBH, IBL, ICH, ICL, IDH, IDL, IDS, IES, ISI, IDI contain the
  484.      contents of the 8086/80286 registers AH, AL, BH, BL, CH, CL, DH, DL, DS,
  485.      ES, SI and DI.  IZF, ICF contain the contents of the Zero and Carry
  486.      flags.  Note that IARRAY is defined as INTEGER*2, and so it covers the
  487.      individual registers which are equal to or less than 16 bits wide.
  488.      
  489.                Example program:  TMBIOS.FOR
  490.      
  491.      
  492.      3.  FORTRAN-I/O INTERFACE MODULES
  493.      
  494.           A.   INPUT
  495.      
  496.                Module function:  Input from I/O Ports
  497.      
  498.                Calling statement:  CALL INPUT(IAL,IDX)
  499.      
  500.                Description of parameters:  IAL and IDX are type INTEGER*2 and
  501.      contain the values in registers AL and DX.  IAL returns the byte value
  502.      input from the port whose number is in IDX.
  503.      
  504.                Example program:  SOUND.FOR
  505.      
  506.      
  507.           B.   OUTPUT
  508.      
  509.                Module function:  Output to I/O Ports
  510.      
  511.                Calling statement:  CALL OUTPUT(IAL,IDX)
  512.      
  513.                Description of parameters:  IAL and IDX are type INTEGER*2 and
  514.      contain the values in registers AL and DX.  IAL contains the byte value to
  515.      be output to the port whose number is in IDX.
  516.      
  517.                Example program:  SOUND.FOR
  518.      
  519.      
  520.      
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.      4.  FORTRAN-MOUSE INTERFACE MODULE
  535.      
  536.                MOUSDR
  537.      
  538.                Module function:  Access the Mouse Driver MOUSE.COM
  539.      
  540.                Interrupt number:  51
  541.      
  542.                Calling statement:  CALL MOUSDR(IARRAY)
  543.      
  544.                Description of parameters:  IARRAY is an integer array of size
  545.      4, type INTEGER*2 and defined as:  IAX, IBX, ICX, IDX.  These parameters
  546.      contain the contents of the 8086/80286 registers AX, BX, CX and DX.  Note
  547.      that IARRAY is defined as INTEGER*2, and so it covers the individual
  548.      registers which are equal to 16 bits wide.
  549.      
  550.                Example program:  TMOUSE.FOR, RMOUSE.FOR
  551.      
  552.      
  553.      5.  FORTRAN-HARDWARE INTERFACE MODULES
  554.      
  555.           A.   MXFER
  556.      
  557.                Module function:  Inter-Memory Data Transfer
  558.      
  559.                Calling statement:  CALL MXFER(ISEG1,IOFF1,ISEG2,IOFF2,NBYT)
  560.      
  561.                Description of parameters:  Data in memory at Segment:Offset
  562.      ISEG1:IOFF1, NBYT bytes long (NBYT should be even), is copied to memory at
  563.      Segment:Offset ISEG2:IOFF2.  ISEG1 and ISEG2 are INTEGER*4, all others are
  564.      INTEGER*2.
  565.      
  566.                Example program:  PEKPOK.FOR, VPP.FOR
  567.      
  568.      
  569.           B.   MXFER1
  570.      
  571.                Module function:  Inter-Memory Data Transfer
  572.      
  573.                Calling statement:  CALL MXFER1(IOP,IARRAY,ISEG,IOFF,NBYT)
  574.      
  575.                Description of parameters:  NBYT bytes of data in array IARRAY
  576.      is copied to (IOP=0) or copied from (IOP=1) memory at Segment:Offset
  577.      ISEG:IOFF.  ISEG is INTEGER*4, all others INTEGER*2. NBYT should be even.
  578.      
  579.                Example program:  PEKPOK.FOR, VPP.FOR
  580.      
  581.      
  582.           C.   MCLR
  583.      
  584.                Module function:  Memory Clear
  585.      
  586.                Calling statement:  CALL MCLR(ISEG,IOFF,NBYT)
  587.      
  588.      
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.                Description of parameters:  NBYT bytes of memory at
  601.      Segment:Offset ISEG:IOFF is cleared (set to 0).  ISEG should be INTEGER*4,
  602.      others INTEGER*2.  NBYT should be even.
  603.      
  604.                Example program:  PEKPOK.FOR, VPP.FOR
  605.      
  606.      
  607.      6.  MISCELLANEOUS MODULES
  608.      
  609.           A.   GETADR
  610.      
  611.                Module function:  Get Variable Address
  612.      
  613.                Calling statement:  CALL GETADR(VAR,ISEG,IOFF)
  614.      
  615.                Description of parameters:  Upon return ISEG, IOFF contain the
  616.      address (Segment:Offset) of variable VAR.  ISEG should be INTEGER*4,
  617.      others INTEGER*2.
  618.      
  619.                Example program:  PEKPOK.FOR, VPP.FOR
  620.      
  621.      
  622.           B.   GETCAD
  623.      
  624.                Module function:  Get Character Variable Address
  625.      
  626.                Calling statement:  CALL GETCAD(CVAR,ISEG,IOFF)
  627.      
  628.                Description of parameters:  Upon return ISEG, IOFF contain the
  629.      address (Segment:Offset) of character variable CVAR.  ISEG should be
  630.      INTEGER*4, others INTEGER*2.
  631.      
  632.                Example program:  RFAT.FOR
  633.      
  634.      
  635.           C.   SLOGIC
  636.      
  637.                Module function:  Logical Operations, AND, OR, XOR, NOT
  638.      
  639.                Calling statement:  CALL SLOGIC(IOP,IARG1,IARG2,IARG3)
  640.      
  641.                Description of parameters:  IARG1 equals IARG2.AND.IARG3
  642.      (IOP=1), or IARG2.OR.IARG3 (IOP=2), or IARG2.XOR.IARG3 (IOP=3), or
  643.      NOT(IARG2).  All parameters are INTEGER*2.
  644.      
  645.                Example program:  TSLOG.FOR, STIMER.FOR
  646.      
  647.      
  648.           D.   RAN
  649.      
  650.                Module function:  Random Number Generator, functionally
  651.      equivalent to that found in VAX/VMS minicomputers.
  652.      
  653.                Calling statement:  X=RAN(ISEED)
  654.      
  655.      
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.                Description of parameters:  X is a real number (0.0 to 1.0). 
  667.      ISEED is the seed, INTEGER*4.
  668.      
  669.                Example program:  TRAN.FOR
  670.      
  671.      
  672.           E.   SDRAN
  673.      
  674.                Module function:  Used internally by RAN to update the seed
  675.      
  676.                Calling statement:  CALL SDRAN(ISEED)
  677.      
  678.                Description of parameters:  ISEED is the seed, INTEGER*4
  679.      
  680.      
  681.           F.   RANDU
  682.      
  683.                Module function:  Random number generator (yes, it is
  684.      functionally equivalent to the classic RANDU).
  685.      
  686.                Calling statement:  CALL RANDU(X,ISEED)
  687.      
  688.                Description of parameters:  X is a real number (0.0 to 1.0). 
  689.      ISEED is the seed, INTEGER*4.
  690.      
  691.                Example program:  TRANDU.FOR
  692.      
  693.      
  694.           G.   SDRDU
  695.      
  696.                Module function:  Used internally by RANDU to update the seed
  697.      
  698.                Calling statement:  CALL SDRDU(ISEED)
  699.      
  700.                Description of parameters:  ISEED is the seed, INTEGER*4
  701.      
  702.      
  703.      IV.  REFERENCE BOOKS
  704.      
  705.      1. Peter Norton, 'PROGRAMMER'S GUIDE TO THE IBM PC AND PS/2', Microsoft
  706.      Press, 1985, 1988.
  707.      2. Ray Duncan, 'ADVANCED MSDOS PROGRAMMING', Microsoft Press, 1986.
  708.      3. Terry R. Dettmann, 'DOS PROGRAMMER'S REFERENCE',QUE,1988.
  709.      4. Richard Wilton, 'PROGRAMMER'S GUIDE TO PC & PS/2 VIDEO SYSTEMS',
  710.      Microsoft Press, 1987.
  711.      
  712.      
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.